all:
	g++ -o main main.cpp -std=c++11
	./main
	@cd Outputfile/ && matlab -nodesktop -nosplash -r B
	@cd Outputfile/ && matlab -nodesktop -nosplash -r C
	@cd Outputfile/ && matlab -nodesktop -nosplash -r D
	@cd Outputfile/ && matlab -nodesktop -nosplash -r E
	@echo Use "make clean" to clean all outputfile and executable.
doc:
	xelatex doc.tex
	xelatex doc.tex
cleanr:
	rm *.aux
	rm *.log
	rm *.pdf
test:
	make test1
	@echo ------------Test InterpConditions----------------------
	./test1
	make test2
	@echo ------------Test Polynomial----------------------
	./test2
	make test3
	@echo ------------Test HermiteInterp----------------------
	./test3
	make test4
	@echo ------------Test NewtonInterp----------------------
	./test4
	@echo Use "make cleanall" to clean all the test files.
test1:
	g++ -o test1 testInterpConditions.cpp -std=c++11
test2:
	g++ -o test2 testPolynomial.cpp
test3:
	g++ -o test3 testHermiteInterp.cpp -std=c++11
test4:
	g++ -o test4 testNewtonInterp.cpp -std=c++11
clean:
	rm main Outputfile/*
cleanall:
	rm test4 test3 test2 test1 main Outputfile/*

